<!DOCTYPE html>
<html>
<head>
    <title>奖励记录表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div style="overflow-x:auto">
                <table style="border-collapse:separate; border-spacing: 10px;">
                    <tr>
                        <td class="col-sm-3">
                            <span class="col-sm-2 control-label">用户ID</span>
                            <input type="text" name="qInput" class="form-control col-sm-10" v-model="q.userId"
                                   @keyup.enter="query" placeholder="用户ID">
                        </td>
                        <td class="col-sm-3">
                            <span class="col-sm-2 control-label" >创建时间</span>
                            <input type="text" name="qInput" readonly="true"  style="width:31%" class="form-control col-sm-4" id="createTime" @keyup.enter="query" placeholder="开始时间">
                            <label class="col-sm-1 control-label">—</label>
                            <input type="text" name="qInput" readonly="true"  style="width:31%"  class="form-control col-sm-3" id="createTime1" @keyup.enter="query" placeholder="结束时间">
                        </td>
                    </tr>
                    <tr>
                        <td class="col-sm-3">
                            <a class="btn btn-default" @click="query">查询</a>
                            <a class="btn btn-default" @click="reset">重置</a>
<!--                            <a class="btn btn-default" @click="exportExcel">导出</a>-->
                        </td>
                    </tr>

                </table>

            </div>
			<#if shiro.hasPermission("sys:rewardslog:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:rewardslog:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:rewardslog:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
			<div class="form-group">
                    <div class="col-sm-2 control-label">获奖用户ID</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.userId" placeholder="获奖用户ID"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">奖励类型</div>
                    <div class="col-sm-10">
                        <select  v-model="rewardsLog.type">
                            <option value="1">流水分红</option>
                            <option value="2">消费分红</option>
                            <option value="3">推荐奖励</option>
                            <option value="4">团队奖励</option>
                            <option value="5">公司奖励</option>
                            <option value="6">业绩奖励</option>
                            <option value="7">限制佣金下单扣除</option>
                            <option value="8">限制佣金下单转化</option>
                        </select>
                    </div>
                </div>
            <div class="form-group">
                    <div class="col-sm-2 control-label">类型描述</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.typeDesc" placeholder="类型描述"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">奖励金额</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.amount" placeholder="奖励金额"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">奖励比例</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.ratio" placeholder="奖励比例"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">奖励基数</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.rewardBase" placeholder="奖励基数"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">贡献奖励者ID</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.rewardUserId" placeholder="贡献奖励者ID"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">贡献奖励者姓名</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.rewardUserName" placeholder="贡献奖励者姓名"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">贡献奖励者手机号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.rewardUserMobile" placeholder="贡献奖励者手机号"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">贡献奖励者等级</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.rewardLevel" placeholder="贡献奖励者等级"/>
                    </div>
                </div>
             <div class="form-group">
                    <div class="col-sm-2 control-label">贡献奖励者等级名称</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="rewardsLog.rewardLevelName" placeholder="贡献奖励者等级名称"/>
                    </div>
            </div>
            <div class="form-group">
            <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/rewardslog.js?_${.now?long}"></script>
</body>
</html>